const express=require('express')
const router=express.Router()

//用户路由处理函数对应的中间件
const sort_Handler=require('../router_handler/sort')
//导入验证数据中间件
const expressJoi=require('@escook/express-joi')

const {sort_find_schema,sort_schema,delete_schema,sort_update_schema}=require('../schema/medicine')

router.post('/findall',sort_Handler.sortall)
router.post('/insert',expressJoi(sort_schema),sort_Handler.insertsort)
router.post('/delete',expressJoi(delete_schema),sort_Handler.deletesort)
router.post('/update',expressJoi(sort_update_schema),sort_Handler.updatesort)
router.post('/find',expressJoi(sort_find_schema),sort_Handler.sortfind)
module.exports=router